import 'package:intl/intl.dart';

class DateUtil {
  DateUtil._();

  static String formatTimestamp(
    int timestamp, {
    String format = 'yyyy-MM-dd HH:mm',
  }) {
    // Convert timestamp to a DateTime object
    final dt = DateTime.fromMillisecondsSinceEpoch(timestamp);

    // Format the DateTime object
    final formattedDate = DateFormat(format).format(dt);

    return formattedDate;
  }
}
